package ace.cmp.data.methodname.method.name.sql.entity.resolver.impl.property;

import ace.cmp.data.methodname.method.name.sql.core.enums.SqlCommandTypeEnum;
import ace.cmp.data.methodname.method.name.sql.entity.model.EntityMapping;
import ace.cmp.data.methodname.method.name.sql.entity.model.EntityPropertyMapping;
import java.lang.reflect.Method;
import java.util.List;

/**
 * @author caspar
 * @date 2023/2/18 11:17 从方法解析实体查询元数据,直接返回实体所有属性
 */
public class SelectQueryPropertyEntityResolverImpl extends AbstractSelectQueryPropertyResolver {

  public SelectQueryPropertyEntityResolverImpl(
      SqlCommandTypeEnum sqlCommandType, Method method, EntityMapping entityMapping) {
    super(sqlCommandType, method, entityMapping);
  }

  @Override
  public List<EntityPropertyMapping> getProperties() {
    return this.getEntityMapping().getProperties();
  }

  @Override
  protected Class resolveClass() {
    return getEntityMapping().getEntityClass();
  }
}
